<template>
  <div>
    <button @click="lookId">点击查看id</button>
    <h2>{{this.$route.params.ccc}}</h2>
    <h2>{{$route.query.id}}</h2> 
    <!-- 不用其他直接提取使用 -->
  </div>
</template>

<script>
export default {
data(){
    return{
        id:'',
        abc:''
    }
},
created(){
    this.id = this.$route.query.id
},
methods:{
    lookId(){
        console.log(this.$route);
        console.log(this.$route.params.ccc);
        
        
        // this.$route
    }
},

}
</script>

<style>

</style>